﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;


public partial class Avanto : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

        
    }

/*    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        HttpCookie MyCookie = new HttpCookie("MyCookie");
        MyCookie.Value = log.Text;
        MyCookie.Expires = DateTime.Now.AddHours(1);
        Response.Cookies.Add(MyCookie);
        DataSet ds = new DataSet();
        SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["conString"].ConnectionString);
        con.Open();
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = con;
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "MAS_pCheckUserLogin";

        cmd.Parameters.Add(new SqlParameter("@Username", SqlDbType.VarChar)).Value = log.Text;
        cmd.Parameters.Add(new SqlParameter("@Password", SqlDbType.VarChar)).Value = pwd.Text;
        
        SqlDataAdapter sda = new SqlDataAdapter(cmd);
        sda.Fill(ds);
        con.Close();
        if (ds.Tables[0].Rows[0]["status"].ToString() == "1")
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Logged Successfully')", true);
            //ds.Tables[0].Rows[0]["message"].ToString();
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Login Failed')", true);
        }

        string roll = Request.Cookies["MyCookie"].Value;
        Customer.Text += "Name: " + roll + "<br />";
    }

  */  
}
